package com.springboot.mapper;


import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.springboot.entity.User;

public interface UserMapper {

	@Select("SELECT * FROM test_user WHERE NAME = #{name}")
	User findByName(@Param("name") String name);

	@Insert("INSERT INTO test_user(NAME, AGE) VALUES(#{name}, #{age})")
	int insert(@Param("name") String name, @Param("age") Integer age);
	
	@Select("SELECT * FROM test_user ")
	List<User> findUserList();


}
